import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Area } from 'libs/db/entity/area.entity';
import { AreaController } from './area.controller';
import { AreaService } from './area.service';

@Module({
    imports: [
        TypeOrmModule.forFeature([Area])
    ],
    controllers: [
        AreaController
    ],
    providers: [
        AreaService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class AreaModule { }
